Repository navigation
Skip detection for patchless no-op expert reviews - #12329
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🧪 Test quality review — PR #12329
Compared merge base 129aff748a337473ebd9a2b9417a6779cd6619d3 with head 3b898579dcac3024c8a02a61c617884e3df64c7a. Evidence applies to this head, not every intermediate commit.
Test-value evidence
| Contract | Test | Expected outcome | Evidence |
|---|---|---|---|
Noop-only output (output_types=noop, no patch) skips detection for review, review-on-open, review-after-autofix; mixed, incomplete and patch outputs stay eligible |
test_expert_review_detection_skips_noop_only_runs (subTest per workflow) |
Authored and compiled detection.if match the gate |
Static prediction: it fails on the old condition output_types != '' || has_patch == 'true' and passes on the new one. The PR reports executed red/green runs, but no accessible run record binds them to these revisions, so they are unverified here. |
| Detection security controls and non-publishing noop policy stay intact | test_expert_review_noop_skip_preserves_detection_security_controls |
Passes before and after | Static prediction: a guard test, expected green on both revisions. |
| README documentation, lock regeneration | n/a | n/a | Not applicable: non-executable or generated. |
🧵 Parallel safety
Not applicable. The PR changes no C# tests and no parallelization configuration.
Per-test assessment
No C# or MSTest test methods changed, so no grading rubric applies. The changed tests are Python unittest configuration-contract tests, and I did not grade them. No inline findings.
<sub>This advisory review is heuristic and non-blocking. Nothing was executed.
Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.</sub>
🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto · ~22 AIC · ⌖ ~1 AIC · ⊞ 8.1K
There was a problem hiding this comment.
🤖 Copilot expert review — workflow run
Summary: No blocking findings.
- The change in
shared/review-shared.mdcorrectly skips threat detection whenoutput_types == 'noop'and there is no patch. The condition(output_types != '' && output_types != 'noop') || has_patch == 'true'is unchanged for mixed outputs such asnoop,submit_pull_request_review, incomplete reports and patches. - The three regenerated lock files (
review,review-on-open,review-after-autofix) match the source: thefrontmatter_hash, thethreat_detection.conditionmetadata and the detection jobif:all changed consistently. I saw no changes to action pins or otheruses:lines in the diff. report-as-issue: falseis present on the noop config in all three consumers, so a skipped detection cannot publish an issue.- The new Python tests cover the guard and the detection security controls for all three workflows via subTests. I could not run them here (execution was denied), so they are unverified.
- README documentation is accurate and appropriately hedged: it says the guard avoids unnecessary detection and does not claim to repair the engine stall.
Test-value evidence: Not executed. The tests are static assertions on the authored source and the compiled locks, and they would fail on the base revision because the old guard has no noop exclusion (static prediction only).
Dependencies: None added or changed.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified with the change to skip unnecessary threat detection for patchless, no-op-only reviews.
No open issues 🎉
What changed in this PR
This PR avoids unnecessary threat detection for patchless, no-op-only expert reviews across TestFx’s three review workflows. It addresses the eligibility issue tracked in #12320 without claiming to fix the underlying detector timeout.
Changes:
- Exclude exact
noopoutput when no patch exists, while preserving eligibility for reviews, incomplete reports, mixed outputs, and patches. - Regenerate all three workflow locks with the shared guard.
- Add configuration regression checks and document the incident and remaining limitations.
Test-value evidence: The PR reports failing baseline assertions and 11 passing test methods at 3b898579dcac3024c8a02a61c617884e3df64c7a. Execution artifacts were retained privately and were not independently verified here; no hosted replay was performed.
| File | Description |
|---|---|
.github/workflows/shared/review-shared.md |
Excludes patchless no-op-only reviews from detection. |
.github/workflows/review.agent.lock.yml |
Applies the guard to /review. |
.github/workflows/review-on-open.agent.lock.yml |
Applies the guard to ready-PR reviews. |
.github/workflows/review-after-autofix.agent.lock.yml |
Applies the guard to after-autofix reviews. |
.github/workflows/README.md |
Documents the incident, eligibility fix, and unresolved causes. |
.github/scripts/test_agentic_workflow_warning_contracts.py |
Adds guard and security-control checks for all three workflows. |
Review effort: Balanced
Pull request
Summary
Expert-review run 42848192058 emitted only
noopwithhas_patch=false, but unnecessarily launched detection, which timed out without a verdict. Exclude that non-publishing case in the shared guard used by ready-PR,/review, and after-autofix reviews.Real reviews, incomplete reports, mixed outputs and every patch remain eligible. Detector model/runtime pins, credentials, permissions, firewall, output limits and failure policy are unchanged.
Relates to #12320
Design and decision record
Reuse the existing no-op eligibility contract from Pipeline Test Triage and ResourceLock rather than changing the detector, increasing timeouts, adding retries or disabling detection. The maintained troubleshooting rationale records the incident, comparison runs and regression cases; a separate feature RFC is not needed.
This is a scoped eligibility fix, not a proven repair of the engine stall. The stall's internal cause and the separate unsupported reviewer-model rejection in that run remain unresolved. Keep the automatically managed detection tracker open.
Demonstration
Nonvisual job-eligibility change; screenshots are not applicable. The authored and compiled conditions previously admitted
output_types=noop, has_patch=false; they now exclude it. Mixednoop,submit_pull_request_reviewoutput and every patch remain eligible. The paired configuration-contract tests below demonstrate the difference, not a hosted model replay.Validation and regression proof
Local Windows validation used Python 3.12.10, gh-aw v1.0.1 and native ShellCheck v0.11.0. The six validated file hashes were unchanged when committed as
3b898579dcac3024c8a02a61c617884e3df64c7a; parent/base:129aff748a337473ebd9a2b9417a6779cd6619d3.For the counterfactual, the current regression tests were retained while workflow inputs came from an isolated
git archiveof the base.$baselinebelow represents that task-owned archive's.github\workflowsdirectory; only the machine-specific path is abbreviated.python .github\scripts\test_agentic_workflow_warning_contracts.py --workflow-root "$baseline" CompiledWarningContractTests -vpython .github\scripts\test_agentic_workflow_warning_contracts.py CompiledWarningContractTests -vgh aw compile review.agent review-on-open.agent review-after-autofix.agent --strict --dry-run --jsongh aw compile review.agent review-on-open.agent review-after-autofix.agent --strict --shellcheck --jsonpython .github\scripts\check_action_pins.pyuses:pins changed.git diff --checkA parsed-YAML comparison confirmed that
jobs.detection.ifis the only changed executable field in each production lock. Logs, diagnostic locks and exact patch/file hashes are retained privately in session artifacts, not uploaded. No new hosted workflow/model replay or review publication was performed; optional Docker-based scanners were not run. No .NET product/package behavior changed, so product builds and package-consuming tests were not run.Test-value evidence
CompiledWarningContractTests.test_expert_review_detection_skips_noop_only_runsnoopoutput.CompiledWarningContractTests.test_expert_review_noop_skip_preserves_detection_security_controlsThis is executed configuration-regression evidence, not proof that future eligible detector runs cannot time out.